package singleton;
//单例模式
//1.私有化构造方法
//2.可在构造方法内填写逻辑，对应反射类的新建对象
public class Single {
	private static Single single = null;
	private Single(){
		//防止新建不同对象
		
	}
	public static Single getInstance(){
		return single == null?(single = new Single()):single;
	}
	
}
